class RecordModel {
  final String? uid;
  final String? objectName;
  final String? owner;
  final String? time;
  final int? number;
  final int? value;
  final int? valid;
  final String? comment;

  RecordModel({
    this.uid,
    this.objectName,
    this.owner,
    this.time,
    this.number,
    this.value,
    this.valid,
    this.comment,
  });

  factory RecordModel.fromJson(Map<String, dynamic> json) {
    return RecordModel(
      uid: json['uid'],
      objectName: json['objectName'],
      owner: json['owner'],
      time: json['time'],
      number: json['number'],
      value: json['value'],
      valid: json['valid'],
      comment: json['commentary'],
    );
  }

  Map<String, dynamic> toJson(RecordModel recordModel) {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['uid'] = recordModel.uid;
    data['objectName'] = recordModel.objectName;
    data['time'] = recordModel.time;
    data['number'] = recordModel.number;
    data['value'] = recordModel.value;
    data['valid'] = recordModel.valid;
    data['owner'] = recordModel.owner;
    return data;
  }

  @override
  String toString() {
    // TODO: implement toString
    return "uid: $uid, objectName: $objectName, owner: $owner, time: $time, number: $number, value: $value, valid: $valid, comment: $comment";
  }
}
